CREATE TABLE [finance].[ChartOfAccounts]
(
[ChartOfAccountId] [bigint] NOT NULL,
[AccountName] [nvarchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[AccountGroupDescription] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ParentChartOfAccountId] [int] NULL,
[IsCollection] [bit] NOT NULL,
[AccountCode] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LowerBound] [bigint] NULL,
[UpperBound] [bigint] NULL,
[AccountStatus] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[isControlAccount] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[LedgerTypeId] [int] NULL,
[AccountCategoryId] [tinyint] NULL,
[IFASNumber] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[NormalBalanceType] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[UpdatedDate] [datetime] NULL,
[UpdatedUser] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [finance].[ChartOfAccounts] ADD CONSTRAINT [PK_ChartOfAccounts] PRIMARY KEY CLUSTERED  ([ChartOfAccountId]) ON [PRIMARY]
GO
